package main

type mysqlConf struct {
	Host     string
	Port     string
	User     string
	Password     string
	Charset  string
	Database string
}

type redisConf struct {
	Host           string
	Port           string
	Password           string
	Database       string
	Queue          string
	ArticleQueue	string
	HaoServiceCity string
	Timeout        int
}

type logConf struct {
	File   string
	SqlLog bool
	Debug  bool
}

type antConf struct {
	AntNestUrl string
	AppKey     string
	SecretKey  string
}

type crawlerConf struct {
	Interval  int
}

type config struct {
	Mysql mysqlConf
	Redis redisConf
	Log   logConf
	Ant   antConf
	Crawler crawlerConf
}

type Site struct {
	SiteType string
	Url string
	CategoryId int
	ChildId int
	StartPage int
	endPage int
}


type ClcwArticle struct {
	ArticleId        int    `xorm:"not null pk autoincr INT(10)"`
	CategoryId       int    `xorm:"not null default 0 index INT(10)"`
	ChildId          int    `xorm:"not null default 0 INT(10)"`
	ArticleTitle     string `xorm:"not null default '' VARCHAR(255)"`
	ArticleFocus     string `xorm:"not null default '' VARCHAR(255)"`
	ArticleThumb     string `xorm:"not null default '' VARCHAR(255)"`
	ArticleDesc      string `xorm:"not null default '' VARCHAR(255)"`
	ArticleContent   string `xorm:"not null LONGTEXT"`
	Author           string `xorm:"not null default '' VARCHAR(255)"`
	IsTop            int    `xorm:"not null default 0 TINYINT(1)"`
	Click            int    `xorm:"not null default 0 INT(10)"`
	Share            int    `xorm:"not null default 0 index INT(10)"`
	Status           int    `xorm:"not null default 0 TINYINT(1)"`
	CreateTime       int    `xorm:"not null default 0 INT(10)"`
	UpdateTime       int    `xorm:"not null default 0 INT(10)"`
	PublishTime      int    `xorm:"not null default 0 INT(10)"`
	Type             int    `xorm:"not null default 1 TINYINT(10)"`
	FromName         string `xorm:"not null default '' VARCHAR(10)"`
	FromUrl          string `xorm:"not null default '' VARCHAR(100)"`
}

